$(document).ready(function() {
	$("#btnRealData").click(function(){
		window.location.href = "biz/index_data.html";
	});
	
   $("#btnLogin").click(function(){
	   var inputdata ={
	   		param_name: "T01_F7G83H",
			param_value1: $("#login_id").val(),
			param_value2: $("#login_pwd").val()
	   }
	   get_ajax_staticurl(inputdata, "get_T01_F7G83H");
   	})
   	
   	var inputdata = {
        "param_name": "T01_VX0Y6B"
    };
   	ly_index = layer.load();
   	get_ajax_baseurl(inputdata, "get_T01_VX0Y6B");	
});

//用户登录
function get_T01_F7G83H(input){
	//查询失败
	if (Call_QryResult(input.T01_F7G83H) == false)
	{
		
	}
	else
	{
		localStorage.setItem('session_id', input.T01_F7G83H[0][GetLowUpp("session_id")]);				
		localStorage.setItem('login_id', input.T01_F7G83H[0][GetLowUpp("MAIN_ID")]);			
		localStorage.setItem('nickname', input.T01_F7G83H[0][GetLowUpp("nickname")]);	
		localStorage.setItem('rid', input.T01_F7G83H[0][GetLowUpp("rid")]);
		window.location.href = "index.html";
	}
}

function get_T01_VX0Y6B(input) {
	var vResult = "";
    layer.close(ly_index);
    var inputs = input.T01_VX0Y6B;
    //查询失败
    if (Call_QryResult(inputs) == false)
        return false;
    $.each(inputs, function (i, obj){
    	if(obj.PARAM_KEY == "station_name"){
    		vResult += obj.PARAM_VALUE;
    	}
    	else if(obj.PARAM_KEY == "title"){
    		vResult += obj.PARAM_VALUE;
    	}
    });
    s_title = vResult;
    localStorage.setItem('s_title', vResult);
    $("title").html("欢迎使用"+s_title);
    $("#div_title").html(s_title);
}